//
// Created by lyx on 2020/8/6.
//
#include <iostream>
#include <Utils.h>
using namespace std;
//namespace dbg=lyxutils::debug;
//namespace xio=lyxutils::io;
using namespace lyxutils::abbreviations;

int main(){
    string fileName="test_estimate.txt";
    string fileName2="estimate_small.txt";
    size_t row=dbg::estimate_file_rows(fileName,50);
    size_t row2=dbg::estimate_file_rows(fileName2,20);
    cout<<"estimate file rows of "<<fileName<<"="<<row<<endl;
    cout<<"estimate small file "<<fileName2<<",rows="<<row2<<endl;
    int total=100;
    cout<<"start time:"<<dbg::getTimeString()<<endl;
    for(int i=0;i<total;++i){
        for(int j=0;j<3;++j){
            dbg::sleep(10);
        }
        xio::consoleProgressBar(i+1,total,40);
    }
    cout<<"end time:"<<dbg::getTimeString()<<endl;
}